package com.cykj.v_m_sprintboot.serviceImpl;

import com.cykj.v_m_sprintboot.bean.TbUser;
import com.cykj.v_m_sprintboot.mapper.TbUserMapper;
import com.cykj.v_m_sprintboot.service.TbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TbUserServiceIml implements TbUserService {
    @Autowired
    private TbUserMapper tbUserMapper;
    @Override
    public TbUser selectUser(String openid) {



        return  tbUserMapper.selectUser(openid);
    }

    @Override
    public boolean insertUser(String userName,String wxOpenId,String nowTime,String headImg) {
        boolean a = false;
        try {
            tbUserMapper.insertUser(userName,wxOpenId,nowTime,headImg);
            a = true;
        }catch (Exception e){
            a = false;
        }
        return a;
    }
}
